The present invention relates to the field of computer graphics. Many computer graphic images are created by mathematically modeling the interaction of light with a three dimensional scene from a given viewpoint. This process, called rendering, generates a two-dimensional image of the scene from the given viewpoint, and is analogous to taking a photograph of a real-world scene.
As the demand for computer graphics, and in particular for real-time computer graphics, has increased, computer systems with graphics processing subsystems adapted to accelerate the rendering process have become widespread. In these computer systems, the rendering process is divided between a computer's general purpose central processing unit (CPU) and the graphics processing subsystem. Typically, the CPU performs high level operations, such as determining the position, motion, and collision of objects in a given scene. From these high level operations, the CPU generates a set of rendering instructions and data defining the desired rendered image or images. For example, rendering instructions and data can define scene geometry, lighting, shading, texturing, motion, and/or camera parameters for a scene. The graphics processing subsystem creates one or more rendered images from the set of rendering instructions and data.
To maximize rendering performance, it is generally desirable for the CPU and the graphics processing subsystem to operate asynchronously. This permits both the CPU and the graphics processing subsystem to operate independently of each other and without interruption. However, typical graphics processing subsystems require the direct assistance of the CPU to perform certain tasks, such as updating the graphics processing subsystem's control registers or evaluating conditional statements. During these tasks, the CPU and graphics processing subsystem must operate synchronously. Typically, this requires the graphics processing subsystem to be idle while waiting for the CPU, or vice-versa. This wasteful processing overhead decreases the performance of the computer system. Further, many rendering optimizations that are theoretically possible cannot be implemented because the processing overhead is greater than the performance improvements.
It is therefore desirable for a graphics processing subsystem to perform tasks such as updating its own control registers or evaluating conditional statements without the assistance of the CPU.